﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Questions.aspx.cs" Inherits="Questions" %>

<asp:Content ID="Content1" ContentPlaceHolderID="BodyContent" runat="Server">
    <div class="contentfull">
        <div class="breadcrumbs">
            <ul id="crumbs">
                <li><a title="My Account" href="/account/">My Account</a>
                    <img src=Content/Images/separator.png alt="&rarr;" class="separator">
                    Questions 			</li>
            </ul>
        </div>

        <div id="showMessages"></div>

        <div class="top">
            <div class="innerright">
                <a href="CreateQuestion.aspx" class="black_button bhuge create_button" title="Create a Question">Create a Question</a>
                <div class="need-help"><a href="#" target="_blank">Need help creating a Question?</a></div>
            </div>
            <div class="listall_innerleft">

                <h1>Questions</h1>

                <div class="lower_comment order_by" style="float: left">
                    Order By:  
                    
                    <a href="Users.aspx?order=time" style="font-weight: lighter; color: #999" id="dateSorter" runat="server">Creation Date</a>
                    <a href="Users.aspx?order=alpha" style="font-weight: lighter; color: #999;" id="nameSorter" runat="server">Question Text</a>
                    <a href="Users.aspx?order=service" style="font-weight: lighter; color: #999;" id="serviceSorter" runat="server">Number of Services</a>

                    Show:
								<strong><a href="?show=pagination&page=1&order=time" style="font-weight: bolder">Paginated</a></strong>&nbsp;&nbsp;&nbsp;<a href="?show=all&order=time" style="font-weight: lighter; color: #999">All</a>
                </div>
            </div>


        </div>

        <div class="pagination" style="padding: 0">
            <div class="scancount large center" id="questionCount" runat="server"></div>
        </div>
        <div class="content">
            <ul class="data">
              
                    <asp:ListView ID="lstQuestion" runat="server" ItemPlaceholderID="itemContainer">
                        <LayoutTemplate>
                            <asp:PlaceHolder ID="itemContainer" runat="server"></asp:PlaceHolder>
                        </LayoutTemplate>
                        <ItemTemplate>
                              <li class="inactive">
                            <p class="data_action">
                                <a href="CreateQuestion.aspx?QuestionId=<%#Eval("QuestionId")%>" title="Edit">Edit</a>
                                <a href="/account/questions/217544/delete/" onclick="return confirm('Are you sure you want to delete this question? You will not be able to undo this action.');">Delete</a>
                            </p>
                            <img src="<%# this.GetImage(Eval("QuestionType").ToString()) %>" alt="<%# Eval("QuestionType")%>" class="dataicon">

                            <h1><a href="CreateQuestion.aspx?QuestionId=<%#Eval("QuestionId")%>" title="Edit"><%#Eval("QuestionText")%></a></h1>
                            <h2><%#Eval("QuestionType")%></h2>
                            <dl class="group meta">

                                <dt>
                                    <img src="Images/time16.png" alt="" class="attr"></dt>
                                <dd><%#Eval("CreateDate")%></dd>

                                <%# this.GetAnswersOption(Eval("QuestionId").ToString()) %>
                                <dt>
                                    <img src="Images/service16.png" class="attr" alt="Used in these services:" /></dt>

                                <dd title="The question is associated with these services.">
                                    <%# this.GetServiceCount(Eval("QuestionId").ToString()) %>
                                </dd>


                            </dl>
                            </li>
                        </ItemTemplate>
                        <EmptyDataTemplate>
                            <div>
                                Sorry - No Questions Found
                            </div>
                        </EmptyDataTemplate>
                    </asp:ListView>
            </ul>

            <script type="text/javascript">
                $(document).ready(function () {
                    $('#search_box').val('');

                    // check out SSICA.js, this sets up Jquery stuff for hiding and showing services.
                    setupClickToShowService();
                });
            </script>



        </div>
        <!-- /.contentfull -->
</asp:Content>

